package com.atguigu.gulimall.order;

import com.atguigu.gmall.common.config.pool.annotation.EnableAppThreadPool;
import com.atguigu.gmall.common.interceptor.annotation.EnableUserAuthFeignInterceptor;
import com.atguigu.gulimall.feign.ware.fallback.WareFeignClientFallBack;
import com.atguigu.gulimall.util.annotation.EnableMallRabbit;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Import;
/**
 *
 * RabbitTemplate：收发消息
 * AmpqAdmin: 对MQ资源（队列、交换机）进行CRUD
 */
@EnableMallRabbit
@Import(WareFeignClientFallBack.class)//容错兜底
@MapperScan("com.atguigu.gulimall.order.mapper")
@SpringBootApplication
@EnableUserAuthFeignInterceptor//开启feign拦截器
@EnableAppThreadPool
@EnableFeignClients({
        "com.atguigu.gulimall.feign.cart",
        "com.atguigu.gulimall.feign.user",
        "com.atguigu.gulimall.feign.product",
        "com.atguigu.gulimall.feign.ware"
})
public class OrderMainApplication {
    public static void main(String[] args) {
        SpringApplication.run(OrderMainApplication.class, args);
    }
}
